# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rbndr
pkgver=9.a189ffd
pkgrel=1
pkgdesc='Simple DNS Rebinding Service.'
groups=('blackarch' 'blackarch-spoof')
arch=('x86_64' 'aarch64')
url='https://github.com/taviso/rbndr'
license=('GPL3')
depends=()
makedepends=('git')
source=("git+https://github.com/taviso/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  gcc rebinder.c -o $pkgname
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md rebinder.html
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

